﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="User_List.aspx.cs" MasterPageFile="~/Admin/Admin.Master"
    Inherits="TimKen.Web.Admin.UserAccount.User_List" %>

<asp:Content ContentPlaceHolderID="ContentTitle" ID="title" runat="server">
    <%=GetLangString("MeunUserAccountList")%>
    <script type="text/javascript">
        function testKeyEven(oEvent) {
            var e = event || oEvent;
            if ((e.keyCode > 95 && e.keyCode < 106) || (e.keyCode > 47 && e.keyCode < 58)) {
                return true;
            }
            return false;
        }
        $(function () {
            $("#<%=txtCustomerID.ClientID%>").keydown(function (e) {
                //testKeyEven(e);
//                var reg = /^\d{1,10}$/g;
//                if (reg.test($(this).val())) {
//                    return true;
//                } else {
//                    return false;
//                }
//            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentLinkAction" runat="server">
    <span class="action-span"><a href="User_Add.aspx">
        <%=GetLangString("MeunUserAccountInfo")%></a></span>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentMain" ID="content" runat="server">
    <div class=" form-div">
        <img src="../images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
        <%=GetLangString("UserName")%>：<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
        <%=GetLangString("CustomerName")%>：<%--<asp:DropDownList ID="txtCustomerID" runat="server">
        </asp:DropDownList>--%><asp:TextBox ID="txtCustomerID" runat="server"></asp:TextBox>
        <%=GetLangString("TypeName")%>：<asp:DropDownList ID="dplRole" runat="server">
        </asp:DropDownList>
        <asp:Button ID="btFilter" runat="server" CssClass="button" OnClick="btFilter_Click" />
        &nbsp;
        <asp:Button ID="btNoFilter" runat="server" CssClass="button" OnClick="btNoFilter_Click" />
        </span>
    </div>
    <div class="list-div">
        <asp:GridView ID="grdUserList" runat="server" AutoGenerateColumns="False" OnRowCommand="grdUserList_RowCommand"
            CssClass="grid">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("UserName")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("UserName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("RealName")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("RealName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("Telephone")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("Phone")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("Email")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("Email")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("CustomerName")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("CustomerName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("RoleName")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("RoleName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("CreateDate")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("CreateDate","{0:d}")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="80" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("Operation")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <a href='/admin/useraccount/User_Add.aspx?UserName=<%#Eval("UserName") %>' title='<%#GetLangString("Edit")%>'>
                            <img src="../images/icon_edit.gif" /></a>
                        <asp:ImageButton ID="btnDelete" runat="server" ToolTip='<%#GetLangString("Delete")%>'
                            CommandName="DeleteEvent" CommandArgument='<%#Eval("UserName")%>' ImageUrl="~/Admin/images/icon_drop.gif"
                            OnClientClick="return deleteConfirm()" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle HorizontalAlign="Center" />
        </asp:GridView>
        <div class="pager-div">
            <ux:AspNetPager ID="AspNetPager1" runat="server" Width="100%" ShowPageIndexBox="Always"
                HorizontalAlign="right" EnableTheming="true" AlwaysShow="true" PageIndexBoxType="DropDownList"
                OnPageChanged="AspNetPager1_PageChanged" ImagePath="/images/" NavigationButtonType="Image"
                ButtonImageNameExtension="n" CpiButtonImageNameExtension="r" PagingButtonType="Image">
            </ux:AspNetPager>
        </div>
    </div>
</asp:Content>
